<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh" xml:lang="zh">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>DevelopTools - Leakon</title>

<style type="text/css">
body, td, textarea,
input, p	{font-family:Tahoma; font-size:12px;}
td		{padding:8px;}
p		{background:#ecf2fa; height:28px; xletter-spacing:0.04em; font-size:16px; font-family:Lucida Console;}
p		{font-family:Cambria; font-size:24px; font-weight:bold;}

.inputTextarea	{width:900px; height:16px; padding:4px;}
.inputTextarea	{height:100px;}

.output		{padding:8px; border:1px dotted gray;}
.button		{padding:8px;}

table.myTable		{background:black; width:100%; margin:8px 0;}
table.myTable td	{background:white;}

table.myTable tr.rowFocus td	{background:#ffffcc;}

</style>

<script type="text/javascript" src="md4.js"></script>
<script type="text/javascript" src="md5.js"></script>
<script type="text/javascript" src="sha1.js"></script>

<script type="text/javascript">
function getInput() {
	var ret	= '';
	var o	= document.getElementById('idStrInput');
	if (o) {
		ret	= o.value;
	}
	return	ret;
}
function SetOutput(t, v) {
	var o	= document.getElementById(t);
	if (o) {
		o.innerHTML	= v;
		o.value		= v;
	}
}
function GetOutput(strType) {
	var input	= getInput();
	var output	= '';
	if ('md4' == strType) {
		out	= hex_md4(input);
	}
	if ('md5' == strType) {
		out	= hex_md5(input);
	}
	if ('sha1' == strType) {
		out	= hex_sha1(input);
	}
	SetOutput('idStrOutput', out + " [" + strType + "]");
}
function ClearText() {
	SetOutput('idStrInput', '');
	SetOutput('idStrOutput', '');
}
</script>

<head>

<body>

<table class="myTable" cellpadding="0" cellspacing="1">
<tr class="rowFocus" id="row_id_gbk_unserialize">
	<td>
		<textarea id="idStrInput" name="strInput" class="inputTextarea" onfocus="this.select()"></textarea>
		<p class="output" id="idStrOutput"></p>
	</td>
</tr>
</table>

<input type="button" value="MD4" class="button" onclick="GetOutput('md4')" />
<input type="button" value="MD5" class="button" onclick="GetOutput('md5')" />
<input type="button" value="SHA1" class="button" onclick="GetOutput('sha1')" />
<input type="button" value="Clear" class="button" onclick="ClearText()" />

</body>
</html>